/*
*	缓存类
*	国家边界PLY缓存、省级PLY缓存
*	
*	
*/
var Cache = {
	country_ply:[],
	province_ply:{},
	//省内所有城市的ply	用于zoom:7时的时间切换（非永久缓存）
	city_ply:{},
	//隐藏所有province_ply
	hideProvincePly : function(){
		var k,i;
		for( k in this.province_ply){
			for(i=0;i<this.province_ply[k].length;i++){
				this.province_ply[k][i].hide();
			}
		}
	},
	//显示所有province_ply
	showProvincePly : function(){
		var k,i;
		for( k in this.province_ply){
			for(i=0;i<this.province_ply[k].length;i++){
				this.province_ply[k][i].show();
			}
		}
	},
	//隐藏国境
	hideCountryPly : function(){
		this.country_ply.hide();
	},
	//显示国境
	showCountryPly : function(){
		this.country_ply.show();
	}
}


//工具函数
var deepCopy= function(source) { 
	console.log("deepcopy");
	var result={};
	for (var key in source) {
		if(typeof source[key] === 'object' ){
			result[key] = deepCopy(source[key]);
		}
		else{
			result[key] = source[key];
		}
   } 
   return result; 
}